<template>
  <div class="app-container">
    <el-card shadow="never">
      <el-collapse v-model="activeName" :accordion="true">
        <el-collapse-item
          v-for="({ title, name, component }, index) in collapseType"
          :key="index"
          :name
          :title
        >
          <el-card style="max-width: 650px">
            <!--            <component :is="component" />-->
            <Single v-if="name === '1'" />
            <Average v-if="name === '2'" />
            <ConfigLine v-if="name === '3'" />
            <MonitorConfig v-if="name === '4'" />
            <LongComprehensive v-if="name === '5'" />
            <StageSynthesis v-if="name === '6'" />
            <SpecialInspection v-if="name === '7'" />
          </el-card>
        </el-collapse-item>
      </el-collapse>
    </el-card>
  </div>
</template>

<script lang="ts" setup>
import Single from "@/views/qms/pcm/pcmsystemconfig/components/single.vue";
import Average from "@/views/qms/pcm/pcmsystemconfig/components/average.vue";
import ConfigLine from "@/views/qms/pcm/pcmsystemconfig/components/configLine.vue";
import MonitorConfig from "@/views/qms/pcm/pcmsystemconfig/components/monitorConfig.vue";
import LongComprehensive from "@/views/qms/pcm/pcmsystemconfig/components/longComprehensive.vue";
import StageSynthesis from "@/views/qms/pcm/pcmsystemconfig/components/stageSynthesis.vue";
import SpecialInspection from "@/views/qms/pcm/pcmsystemconfig/components/specialInspection.vue";

defineOptions({
  name: "QMSPCMPCMSPECIALRULE",
  inheritAttrs: false,
});

const activeName = ref("1");

const collapseType = ref([
  {
    title: "单值图",
    name: "1",
    component: Single,
  },
  {
    title: "均值图",
    name: "2",
    component: Average,
  },
  {
    title: "默认控制线",
    name: "3",
    component: ConfigLine,
  },
  {
    title: "监控过程能力配置",
    name: "4",
    component: MonitorConfig,
  },
  {
    title: "长期综合过程能力取样配置",
    name: "5",
    component: LongComprehensive,
  },
  {
    title: "阶段综合过程能力取样配置",
    name: "6",
    component: StageSynthesis,
  },
  {
    title: "特殊送检状态过程预警配置",
    name: "7",
    component: SpecialInspection,
  },
]);
</script>

<style scoped lang="scss"></style>
